export interface RouteItem {
  menuname: Array<string>;
  asdefault?: boolean; // 默认显示
  path?: string;
  type?: boolean;
  component?: string | (() => any);
  isTabMenu?: boolean;
  tabTitle?: string;
}

export type RoutesConfig = RouteItem[];
const config: RoutesConfig = [
  // 订单中心
  {
    menuname: ['订单中心', '应收账款'],
    asdefault: true,
    path: '/finance/accountsReceivable',
    component: '../pages/finance/accounts/receivable/index.tsx',
  },
  {
    menuname: ['订单中心', '应收账款'],
    asdefault: false,
    tabTitle: '应收详情',
    type: true,
    path: '/finance/accountsReceivable/details',
    component: '../pages/finance/accounts/receivable/details.tsx',
  },
  {
    menuname: ['订单中心', '应收账款'],
    asdefault: false,
    tabTitle: '收款',
    type: true,
    path: '/finance/accountsReceivable/info',
    component: '../pages/finance/accounts/receivable/info.tsx',
  },
  {
    menuname: ['订单中心', '交易流水'],
    asdefault: false,
    path: '/finance/transactionRecord',
    component: '../pages/finance/transactionRecord/index.tsx',
  },
  {
    menuname: ['订单中心', '应退账款'],
    asdefault: false,
    path: '/finance/accountsReturnable',
    component: '../pages/finance/accounts/returnable/index.tsx',
  },
  {
    menuname: ['订单中心', '应退账款'],
    asdefault: false,
    tabTitle: '应退详情',
    type: true,
    path: '/finance/accountsReturnable/details',
    component: '../pages/finance/accounts/returnable/details.tsx',
  },
  {
    menuname: ['订单中心', '应退账款'],
    asdefault: false,
    tabTitle: '退款',
    type: true,
    path: '/finance/accountsReturnable/info',
    component: '../pages/finance/accounts/returnable/info.tsx',
  },
  {
    menuname: ['订单中心', '结算款审核'],
    asdefault: false,
    path: '/finance/settlementAudit',
    component: '../pages/finance/settlementAudit/index.tsx',
  },
  {
    menuname: ['订单中心', '结算款审核'],
    asdefault: false,
    tabTitle: '结算单详情',
    type: true,
    path: '/finance/settlementAudit/details',
    component: '../pages/finance/settlementAudit/details.tsx',
  },
  {
    menuname: ['订单中心', '结算款审核'],
    asdefault: false,
    tabTitle: '结算单审核',
    type: true,
    path: '/finance/settlementAudit/examine',
    component: '../pages/finance/settlementAudit/details.tsx',
  },
  {
    menuname: ['订单中心', '费用减免列表'],
    asdefault: false,
    path: '/finance/feeWaiver',
    component: '../pages/finance/feeWaiver/index.tsx',
  },
  {
    menuname: ['订单中心', '费用减免列表'],
    asdefault: false,
    tabTitle: '费用减免单详情',
    type: true,
    path: '/finance/feeWaiver/detail',
    component: '../pages/finance/feeWaiver/details.tsx',
  },
  {
    menuname: ['订单中心', '费用减免列表'],
    asdefault: false,
    tabTitle: '费用减免单审核',
    type: true,
    path: '/finance/feeWaiver/examine',
    component: '../pages/finance/feeWaiver/details.tsx',
  },
  {
    menuname: ['订单中心', '延租审核'],
    asdefault: false,
    path: '/finance/delayRentAudit',
    component: '../pages/finance/rentAudit/delay/index.tsx',
  },
  {
    menuname: ['订单中心', '延租审核'],
    asdefault: false,
    tabTitle: '延租单详情',
    type: true,
    path: '/finance/delayRentAudit/detail',
    component: '../pages/finance/rentAudit/delay/details.tsx',
  },
  {
    menuname: ['订单中心', '延租审核'],
    asdefault: false,
    tabTitle: '延租单审核',
    type: true,
    path: '/finance/delayRentAudit/examine',
    component: '../pages/finance/rentAudit/delay/details.tsx',
  },
  {
    menuname: ['订单中心', '免租审核'],
    asdefault: false,
    path: '/finance/freeRentAudit',
    component: '../pages/finance/rentAudit/free/index.tsx',
  },
  {
    menuname: ['订单中心', '免租审核'],
    asdefault: false,
    tabTitle: '免租单详情',
    type: true,
    path: '/finance/freeRentAudit/detail',
    component: '../pages/finance/rentAudit/free/details.tsx',
  },
  {
    menuname: ['订单中心', '免租审核'],
    asdefault: false,
    tabTitle: '免租单审核',
    type: true,
    path: '/finance/freeRentAudit/examine',
    component: '../pages/finance/rentAudit/free/details.tsx',
  },
];

export default config;
